package com.ax.center.service;

import com.ax.center.dto.ApiResponse;
import com.ax.center.entity.Announcement;
import com.ax.center.enumeration.ExportFormat;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.core.io.ByteArrayResource;

import java.io.IOException;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zy
 * @date 2023/7/7 15:53
 */
public interface AnnouncementService extends IService<Announcement> {
    public ApiResponse updateAnnouncement(Announcement announcement);

    public ApiResponse deleteAnnouncement(Long id);

    public ApiResponse getAnnouncementById(Long id);


    public ApiResponse createAnnouncement(Announcement announcement);

    public ApiResponse searchAnnouncements(String keyword, String publisher, LocalDateTime startTime, LocalDateTime endTime);

    public ByteArrayResource exportAnnouncements(List<Announcement> announcements, ExportFormat format) throws IOException;
}


